package a1_4;

/**
 * 在线转账支付（Payment子类）
 */
public class WireTransfer extends Payment {
    private String bankID;     // 银行ID
    private String bankName;   // 银行名称

    public WireTransfer() {}

    public WireTransfer(double amount, String bankID, String bankName) {
        super(amount);
        this.bankID = bankID;
        this.bankName = bankName;
    }

    // 实现父类抽象方法：验证转账有效性（简化逻辑）
    @Override
    public boolean validatePayment() {
        return bankID != null && !bankID.isEmpty() && bankName != null && !bankName.isEmpty();
    }

    // Getter/Setter
    public String getBankID() {
        return bankID;
    }

    public void setBankID(String bankID) {
        this.bankID = bankID;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }
}
